﻿-- ================================================
-- Remarks: 
-- ================================================
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[Ivy_Society_GetByID]') AND type in (N'P', N'PC'))
DROP PROCEDURE [Ivy_Society_GetByID]
GO



CREATE PROCEDURE [Ivy_Society_GetByID]
-- =============================================
-- Author:		<Sagar sk>
-- Create date: <08/01/2014>
-- Description:	<Ivy_Society_GetByID>
-- =============================================
-- Add the parameters for the stored procedure here
	(
				@SocietyKey int
	)
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT OFF;

	SELECT	 
	            [SocietyKey],
				[SocietyCode],
				[SocietyName],
				[SocietyAddressLine1],
				[SocietyAddressLine2],
				[SocietyAddressCity],
				[SocietyAddressState],
				[SocietyAddressCountry],
				[SocietyAddressZip],
				[Sys_DateOfCreation],
				[Sys_DateOfModification],
				[Sys_CreatedByID],
				[Sys_ModifiedByID],
				[Sys_DeleteType],
				[Sys_IsDeleted],
				[Sys_OrganizationID],
				[Sys_InitialPrimaryKeys],
				[Sys_WorkstationName]
	FROM	[Society]
	WHERE		
		(
			[SocietyKey] = @SocietyKey
		);
END

GO


